<html>
    <head>
        
        <script type="text/javascript" src="<?php echo base_url()?>uploadify/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>uploadify/swfobject.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script src="<?php echo base_url()?>images/js/gmap.js"></script>

<script src="<?php echo base_url()?>images/js/qunit.js"></script>
<script src="<?php echo base_url()?>images/js/external/jquery.bgiframe-2.1.2.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.core.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.widget.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.mouse.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.button.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.draggable.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.position.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.resizable.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.ui.dialog.js"></script>
<script src="<?php echo base_url()?>images/js/ui/jquery.effects.core.js"></script>

           <script type='text/javascript'>
function getview( sid ) 
{
     var url='<?php echo base_url()?>view/publicView';
      $.post(url, {sit_id:sid});     
    
    //getAllSit_ddlist_copy
}

</script>
        
        
    </head>
    <body>    
    
    
 

<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

                    
if (isset ($publicResults)&& is_array($publicResults)) {
                 echo "<div id='PublicResults'>" ;


                $i = 0; // incremental variable for search result numbering


                echo "<table id='publicSituationsResults' border=\"2\">";


                echo "<tr>
             <th>Situation Name</th>
             <th>Situation Description</th>
             <th>Situation ID</th>
             </tr>"  ;
           
         //       echo $publicResults ;
         
                foreach ($publicResults  as $res) { // foreach loop, to loop through each array value (result) as $res
                    $i++; // incrementation
              //      echo "<p>" . $i . ": <a href='" . "www.google.com" . "'>" . $res->name . "</a><br /><i>" . $res->description . "</i><br /><span style='font-size: 10pt;'>" . $res->id . "</span></p>"; // display everything


                
                echo "<tr>" ;

                echo "<td>" ;   
                echo "<a href=\"".base_url()."view/friendView/". $res->id ." \" >";         echo $res->name;    echo "</a>" ;
               echo "</td>" ;
               
                echo "<td>" ;       if ($res->description == ""){echo "-" ;} echo $res->description ;            echo "</td>" ;
                echo "<td>" ;        echo $res->id ;            echo "</td>" ;

                echo "</tr>" ;
                }

    //            echo "<p><i>1-15 of " . $WebResults['SearchResponse']['Web']['Total'] . " results</i></p>"; // total number of results found by Bing for the search query provided

                echo "</table>" ;
                echo  "</div>" ;
}
else
    {
    echo "<p style=\"font-style:italic  \">No Public Situations Results Found</p>" ;
    }


?>
    

    </body>
</html> 

